<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

class Admin_Controller extends MY_Controller {
	public function __construct(){
		parent::__construct();
		date_default_timezone_set('Asia/Ho_Chi_Minh');
		if(!isset($this->session->userdata['ses_adminid']) && !isset($this->session->userdata['ses_admin'])){
			redirect(base_url()."verify/login");
		}else{
			$this->load->library('ckeditor', array('instanceName' => 'CKEDITOR1','basePath' => base_url()."public/scripts/ckeditor/", 'outPut' => true));
			$this->load->database();
			$dataLang = $this->db->get('tpt_language')->result_array();
			$this->registry->set('language', $dataLang);
			$data_ses=array(
				"current_language" => array('code' => 'vn'),
				"default_language" => array('code' => 'vn')
			);
			$this->session->set_userdata($data_ses);
		}
	}	
}